package org.sbbs.base.searcher;

import javax.servlet.http.HttpServletRequest;

import org.sbbs.base.searcher.impl.JqgridSelfSearchFilter;
import org.sbbs.base.searcher.impl.PropertySearchFilter;

public class SearchFilterBuilder {
	public static final int JQGRID_SELF = 1;
	public static final int PROPERTY_FILTER = 2;

	/**
	 * @param args
	 */
	public static SearchFilter buildSearchFilter(HttpServletRequest req,
			int filterType) {
		if (filterType == JQGRID_SELF)
			return JqgridSelfSearchFilter.BuildSearchFilter(req);
		else if (filterType == PROPERTY_FILTER) {
			return PropertySearchFilter.BuildSearchFilter(req);
		} else
			return null;

	}

}
